import { createWebHashHistory } from 'vue-router'
import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: () => import('@/views/index/IndexContainer.vue'),
      children: [
        {
          path: '',
          component: () => import('@/views/video/VideoContainer.vue')
        },
        {
          path: '/search',
          component: () => import('@/views/search/SearchContainer.vue')
        },
        {
          path: '/self',
          component: () => import('@/views/self/SelfContainer.vue')
        },
        {
          path: '/camera',
          component: () => import('@/views/camera/CameraContainer.vue')
        },
      ]
    },
    {
      path: '/creator',
      component: () => import('@/views/creator/CreatorContainer.vue'),
      children: [
        {
          path: '',
          component: () => import('@/views/creator/CreatorIndexContainer.vue')
        },
        {
          path: '/content',
          component: () => import('@/views/creator/ContentManagement.vue')
        }
      ]
    },
    {
      path: '/_ai',
      component: () => import('@/views/ai/AiContainer.vue')
    },
    {
      path: '/_ai/voice-chat',
      component: () => import('@/views/ai/VoiceChat.vue')
    },
    {
      path: '/marketplace',
      component: () => import('@/views/marketplace/MarketplaceContainer.vue')
    },
    {
      path: '/shoppingcart',
      component: () => import('@/views/shoppingcart/ShoppingCartContainer.vue')
    },
    {
      path: '/unpaid',
      component: () => import('@/views/unpaid/UnpaidContainer.vue')
    },
    {
      path: '/dislay/product',
      component: () => import('@/views/product/ProductDetailContainer.vue')
    },
    {
      path: '/merchant/join',
      component: () => import('@/views/merchant/JoinContainer.vue')
    },
    {
      path: '/merchant/self',
      component: () => import('@/views/merchant/SelfContainer.vue')
    },
    {
      path: '/merchant/product/edit',
      component: () => import('@/views/merchant/EditProductContainer.vue')
    },
    {
      path: '/_live/anchor',
      component: () => import('@/views/live/AnchorContainer.vue')
    },
    {
      path: '/_live/audience',
      component: () => import('@/views/live/AudienceContainer.vue')
    }
  ]
})

export default router
